package com.sg.service.biz.pbff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.exception.Assert;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.service.biz.pbff.AppSceneService;
import com.sg.service.biz.pbff.nb.NbAppScene;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class AppSceneServiceImpl implements AppSceneService {

    @Resource
    com.sg.service.biz.framework.AppSceneService fwBaseAppSceneClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    com.sg.service.biz.framework.HostTypeService fwBaseHostTypeClient;
    @Resource
    com.sg.service.biz.framework.DivineDataService fwBaseDivineDataClient;
    @Resource
    NbAppScene nbAppScene;
    @Resource
    private RedisUtil redisUtil;

    /**
     * B1-1查询业务应用列表（平台）[748]
     * gen by moon at 8/10/2022, 3:41:13 AM
     */
    @Trace(operationName = "B1-1查询业务应用列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizAppSceneListRespDto queryBizAppSceneList(BffQueryBizAppSceneListReqDto reqDto) {


        QueryBizAppSceneListRespDto queryBizAppSceneListRespDto_1 = null;
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D1-1查询业务应用列表 - queryBizAppSceneList
        QueryBizAppSceneListRespDto queryBizAppSceneListRespDto = null;
        QueryBizAppSceneListReqDto queryBizAppSceneListReqDto = new QueryBizAppSceneListReqDto();
        if (reqDto != null) {
            queryBizAppSceneListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:25296_1
            queryBizAppSceneListReqDto.setMiddleground(reqDto.getMiddleground());//sourceId:25295_1
        }

        /*D1-1查询业务应用列表[742]   */
        Assert.isNull(queryBizAppSceneListReqDto.getIsArchive(), "B1-1查询业务应用列表（平台）-D1-1查询业务应用列表-是否存档不能为空", false);
        queryBizAppSceneListRespDto = fwBaseAppSceneClient.queryBizAppSceneList(queryBizAppSceneListReqDto).getData();

        queryBizAppSceneListRespDto_1 = queryBizAppSceneListRespDto;

//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
        if (queryBizAppSceneListRespDto != null) {
            BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto = new BatchQueryInductionRecordListComReqDto();
            if (queryBizAppSceneListRespDto != null) {
                batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryBizAppSceneListRespDto.getBizAppSceneList().stream().map(item -> item.getOperationInductionId())
                        .collect(Collectors.toList()));//sourceId:25299_1
            }

            /*D1-3批量查询就职记录列表（公共）[602]   */

            batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();

            batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
        }

        BffQueryBizAppSceneListRespDto retData = new BffQueryBizAppSceneListRespDto();
        //数据集融合
        if (queryBizAppSceneListRespDto_1 != null && !CollectionUtil.isEmpty(queryBizAppSceneListRespDto_1.getBizAppSceneList())) {
            for (BizAppSceneDto bizAppSceneDto : queryBizAppSceneListRespDto_1.getBizAppSceneList()) {
                BffBizAppSceneDto retElm = new BffBizAppSceneDto();
                if (queryBizAppSceneListRespDto_1 != null) {
                    retElm.setBizAppId(bizAppSceneDto.getBizAppId());//sourceId:13601_2
                    retElm.setBizAppCode(bizAppSceneDto.getBizAppCode());//sourceId:13602_2
                    retElm.setBizAppName(bizAppSceneDto.getBizAppName());//sourceId:13603_2
                    retElm.setSubjectLifeCycle(bizAppSceneDto.getSubjectLifeCycle());//sourceId:13606_2
                    retElm.setOperationInductionId(bizAppSceneDto.getOperationInductionId());//sourceId:13607_2
                    retElm.setOperateTime(bizAppSceneDto.getOperateTime());//sourceId:13608_2
                }
                retData.getBizAppSceneList().add(retElm);
                if (batchQueryInductionRecordListComRespDto_1 != null) {
                    for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                        if (perOrgInductionRecordDto.getInductionRecordId().equals(bizAppSceneDto.getOperationInductionId())) {
                            if (batchQueryInductionRecordListComRespDto_1 != null) {
                                retElm.setUserId(perOrgInductionRecordDto.getUserId());//sourceId:38805_2
                                retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//sourceId:38808_2
                                retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//sourceId:38806_2
                                retElm.setNickName(perOrgInductionRecordDto.getNickName());//sourceId:38807_2
                            }
                        }
                    }
                }

            }
        }//sourceId:31393_1


        retData.setPageNum(queryBizAppSceneListRespDto.getPageNum());
        retData.setPageSize(queryBizAppSceneListRespDto.getPageSize());
        retData.setTotal(queryBizAppSceneListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryBizAppSceneListRespDto.getTotalNum()) / Double.valueOf(queryBizAppSceneListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-1查询被赋能场景列表（平台）[1214]
     * gen by moon at 10/25/2022, 10:01:11 AM
     */
    @Trace(operationName = "B1-1查询被赋能场景列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizAppSceneRelEdListRespDto queryBizAppSceneRelEdList(BffQueryBizAppSceneRelEdListReqDto reqDto) {


        QueryBizAppSceneRelListRespDto queryBizAppSceneRelListRespDto_1 = null;
//步骤0: D1-1查询应用赋能场景列表 - queryBizAppSceneRelList
        QueryBizAppSceneRelListRespDto queryBizAppSceneRelListRespDto = null;
        QueryBizAppSceneRelListReqDto queryBizAppSceneRelListReqDto = new QueryBizAppSceneRelListReqDto();
        if (reqDto != null) {
            queryBizAppSceneRelListReqDto.setByBizAppId(reqDto.getByBizAppId());//SimpleFieldAssign//sourceId:35226_1
            queryBizAppSceneRelListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:35227_1
        }

        /*D1-1查询应用赋能场景列表[1417]   */
        Assert.isNull(queryBizAppSceneRelListReqDto.getIsArchive(), "B1-1查询被赋能场景列表（平台）-D1-1查询应用赋能场景列表-是否存档不能为空", false);
        queryBizAppSceneRelListRespDto = fwBaseAppSceneClient.queryBizAppSceneRelList(queryBizAppSceneRelListReqDto).getData();


        queryBizAppSceneRelListRespDto_1 = queryBizAppSceneRelListRespDto;

        BffQueryBizAppSceneRelEdListRespDto retData = new BffQueryBizAppSceneRelEdListRespDto();
        if (queryBizAppSceneRelListRespDto_1 != null) {
            retData.setBizAppSceneRelList(queryBizAppSceneRelListRespDto_1.getBizAppSceneRelList().stream().map(item -> BeanUtil.toBean(item, BffBizAppSceneRelDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:35230_1
        }


        retData.setPageNum(queryBizAppSceneRelListRespDto.getPageNum());
        retData.setPageSize(queryBizAppSceneRelListRespDto.getPageSize());
        retData.setTotal(queryBizAppSceneRelListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryBizAppSceneRelListRespDto.getTotalNum()) / Double.valueOf(queryBizAppSceneRelListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-1查询宿主类型未推荐场景列表（平台）--待优化[1104]
     * gen by moon at 9/12/2022, 12:30:46 AM
     */
    @Trace(operationName = "B1-1查询宿主类型未推荐场景列表（平台）--待优化")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizScnHostTypeListRespDto queryBizScnHostTypeList(BffQueryBizScnHostTypeListReqDto reqDto) {


        QueryBizSceneListRespDto queryBizSceneListRespDto_1 = null;
//步骤0: D1-1查询业务场景列表 - queryBizSceneList
        QueryBizSceneListRespDto queryBizSceneListRespDto = null;
        QueryBizSceneListReqDto queryBizSceneListReqDto = new QueryBizSceneListReqDto();
        queryBizSceneListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:34375_1
        if (reqDto != null) {
            queryBizSceneListReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:34373_1
        }

        /*D1-1查询业务场景列表[753]   */
        Assert.isNull(queryBizSceneListReqDto.getBizAppId(), "B1-1查询宿主类型未推荐场景列表（平台）--待优化-D1-1查询业务场景列表-业务应用ID不能为空", false);
        Assert.isNull(queryBizSceneListReqDto.getSubjectLifeCycle(), "B1-1查询宿主类型未推荐场景列表（平台）--待优化-D1-1查询业务场景列表-主体生命周期不能为空", false);
        queryBizSceneListRespDto = fwBaseAppSceneClient.queryBizSceneList(queryBizSceneListReqDto).getData();


        queryBizSceneListRespDto_1 = queryBizSceneListRespDto;

//步骤1: D1-1查询宿主类型推荐的业务场景列表（边界） - queryHostTypeBizScnListBorder
        QueryHostTypeBizScnListBorderRespDto queryHostTypeBizScnListBorderRespDto = null;
        QueryHostTypeBizScnListBorderReqDto queryHostTypeBizScnListBorderReqDto = new QueryHostTypeBizScnListBorderReqDto();
        queryHostTypeBizScnListBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:287892_1
        if (reqDto != null) {
            queryHostTypeBizScnListBorderReqDto.setHostTypeId(reqDto.getHostTypeId());//sourceId:23075_1
        }

        /*D1-1查询宿主类型推荐的业务场景列表（边界）[1101]   */
        Assert.isNull(queryHostTypeBizScnListBorderReqDto.getHostTypeId(), "B1-1查询宿主类型未推荐场景列表（平台）--待优化-D1-1查询宿主类型推荐的业务场景列表（边界）-推荐的宿主类型ID不能为空", false);
        Assert.isNull(queryHostTypeBizScnListBorderReqDto.getSubjectLifeCycle(), "B1-1查询宿主类型未推荐场景列表（平台）--待优化-D1-1查询宿主类型推荐的业务场景列表（边界）-主体生命周期不能为空", false);
        queryHostTypeBizScnListBorderRespDto = fwBaseHostTypeClient.queryHostTypeBizScnListBorder(queryHostTypeBizScnListBorderReqDto).getData();


//步骤2: D查询宿主类型可推荐业务场景列表 - queryHostTypeCollectionRemoveExistingDataList
        //ModelCode: collectionRemoveExistingData
        QueryHostTypeCollectionRemoveExistingDataListRespDto collectionRemoveExistingDataRes = null;
        if (queryBizSceneListRespDto != null) {
            QueryHostTypeCollectionRemoveExistingDataListReqDto collectionRemoveExistingDataReq = new QueryHostTypeCollectionRemoveExistingDataListReqDto();
            if (queryBizSceneListRespDto != null) {
                collectionRemoveExistingDataReq.setBizSceneList(queryBizSceneListRespDto.getBizSceneList());//sourceId:46053_1
            }
            if (queryHostTypeBizScnListBorderRespDto != null) {
                collectionRemoveExistingDataReq.setHostTypeBizScnList(queryHostTypeBizScnListBorderRespDto.getHostTypeBizScnList());//sourceId:46054_1
            }

            /*查询宿主类型可推荐业务场景列表（特殊方法）[1593]  入参两个数据集，通过已存在标识字段匹配，去除第一个数据集中已存在的第二个数据集的数据 */

            collectionRemoveExistingDataRes = nbAppScene.queryHostTypeCollectionRemoveExistingDataList(collectionRemoveExistingDataReq);


        }

        BffQueryBizScnHostTypeListRespDto retData = new BffQueryBizScnHostTypeListRespDto();
        if (queryBizSceneListRespDto_1 != null) {
            retData.setBizSceneList(queryBizSceneListRespDto_1.getBizSceneList().stream().map(item -> BeanUtil.toBean(item, BffBizSceneDto.class)).collect(Collectors.toList()));//sourceId:46063_1
        }


        return retData;
    }

    /**
     * B1-1新增应用赋能场景（平台）[768]
     * gen by moon at 8/10/2022, 3:41:52 AM
     */
    @Trace(operationName = "B1-1新增应用赋能场景（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddBizAppSceneRelRespDto addBizAppSceneRel(BffAddBizAppSceneRelReqDto reqDto) {


        AddBizAppSceneRelRespDto addBizAppSceneRelRespDto_1 = null;
//步骤0: D1-1新增应用赋能场景 - addBizAppSceneRel
        AddBizAppSceneRelRespDto addBizAppSceneRelRespDto = null;
        AddBizAppSceneRelReqDto addBizAppSceneRelReqDto = new AddBizAppSceneRelReqDto();
        if (reqDto != null) {
            addBizAppSceneRelReqDto.setBizSceneId(reqDto.getBizSceneId());//sourceId:34934_1
            addBizAppSceneRelReqDto.setByBizAppId(reqDto.getByBizAppId());//sourceId:35217_1
            addBizAppSceneRelReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:34935_1
            addBizAppSceneRelReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:34936_1
        }

        /*D1-1新增应用赋能场景[764]   */
        Assert.isNull(addBizAppSceneRelReqDto.getBizSceneId(), "B1-1新增应用赋能场景（平台）-D1-1新增应用赋能场景-被赋能业务场景ID不能为空", false);
        Assert.isNull(addBizAppSceneRelReqDto.getByBizAppId(), "B1-1新增应用赋能场景（平台）-D1-1新增应用赋能场景-被赋能业务应用ID不能为空", false);
        Assert.isNull(addBizAppSceneRelReqDto.getBizAppId(), "B1-1新增应用赋能场景（平台）-D1-1新增应用赋能场景-赋能业务应用ID不能为空", false);
        Assert.isNull(addBizAppSceneRelReqDto.getSubjectLifeCycle(), "B1-1新增应用赋能场景（平台）-D1-1新增应用赋能场景-主体生命周期不能为空", false);
        addBizAppSceneRelRespDto = fwBaseAppSceneClient.addBizAppSceneRel(addBizAppSceneRelReqDto).getData();

        addBizAppSceneRelRespDto_1 = addBizAppSceneRelRespDto;

        BffAddBizAppSceneRelRespDto retData = new BffAddBizAppSceneRelRespDto();
        if (addBizAppSceneRelRespDto_1 != null) {
            retData.setBizAppSceneRelationshipId(addBizAppSceneRelRespDto_1.getBizAppSceneRelationshipId());//sourceId:34937_1
        }


        return retData;
    }

    /**
     * B1-1查询业务应用菜单列表（边界）[766]
     * gen by moon at 8/10/2022, 3:41:48 AM
     */
    @Trace(operationName = "B1-1查询业务应用菜单列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizAppSceneMenuListRespDto queryBizAppSceneMenuList(BffQueryBizAppSceneMenuListReqDto reqDto) {


        QueryBizAppSceneMenuListRespDto queryBizAppSceneMenuListRespDto_1 = null;
//步骤0: D1-1查询业务应用菜单列表（边界） - queryBizAppSceneMenuList
        QueryBizAppSceneMenuListRespDto queryBizAppSceneMenuListRespDto = null;
        QueryBizAppSceneMenuListReqDto queryBizAppSceneMenuListReqDto = new QueryBizAppSceneMenuListReqDto();


        /*D1-1查询业务应用菜单列表（边界）[1441]   */

        queryBizAppSceneMenuListRespDto = fwBaseAppSceneClient.queryBizAppSceneMenuList(queryBizAppSceneMenuListReqDto).getData();

        queryBizAppSceneMenuListRespDto_1 = queryBizAppSceneMenuListRespDto;

        BffQueryBizAppSceneMenuListRespDto retData = new BffQueryBizAppSceneMenuListRespDto();
        if (queryBizAppSceneMenuListRespDto_1 != null) {
            retData.setBizAppSceneList(queryBizAppSceneMenuListRespDto_1.getBizAppSceneList().stream().map(item -> BeanUtil.toBean(item, BffBizAppSceneDto.class)).collect(Collectors.toList()));//sourceId:34355_1
        }


        return retData;
    }

    /**
     * B1-1查询未赋能场景列表（平台）[765]
     * gen by moon at 8/10/2022, 3:41:45 AM
     */
    @Trace(operationName = "B1-1查询未赋能场景列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryNotEnabledBizSceneListRespDto queryNotEnabledBizSceneList(BffQueryNotEnabledBizSceneListReqDto reqDto) {


        QueryNotEnabledBizSceneListRespDto queryNotEnabledBizSceneListRespDto_1 = null;
//步骤0: D1-1查询未赋能业务场景列表 - queryNotEnabledBizSceneList
        QueryNotEnabledBizSceneListRespDto queryNotEnabledBizSceneListRespDto = null;
        QueryNotEnabledBizSceneListReqDto queryNotEnabledBizSceneListReqDto = new QueryNotEnabledBizSceneListReqDto();
        if (reqDto != null) {
            queryNotEnabledBizSceneListReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:63363_1
        }

        /*D1-1查询未赋能业务场景列表[2175]   */
        Assert.isNull(queryNotEnabledBizSceneListReqDto.getBizAppId(), "B1-1查询未赋能场景列表（平台）-D1-1查询未赋能业务场景列表-业务应用ID不能为空", false);
        queryNotEnabledBizSceneListRespDto = fwBaseAppSceneClient.queryNotEnabledBizSceneList(queryNotEnabledBizSceneListReqDto).getData();

        queryNotEnabledBizSceneListRespDto_1 = queryNotEnabledBizSceneListRespDto;

        BffQueryNotEnabledBizSceneListRespDto retData = new BffQueryNotEnabledBizSceneListRespDto();
        if (queryNotEnabledBizSceneListRespDto_1 != null) {
            retData.setBizSceneList(queryNotEnabledBizSceneListRespDto_1.getBizSceneList().stream().map(item -> BeanUtil.toBean(item, BffBizSceneDto.class)).collect(Collectors.toList()));//sourceId:63366_1
        }


        return retData;
    }

    /**
     * B1-1修改业务场景（平台）[761]
     * gen by moon at 8/10/2022, 3:41:41 AM
     */
    @Trace(operationName = "B1-1修改业务场景（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateBizSceneRespDto updateBizScene(BffUpdateBizSceneReqDto reqDto) {


        //步骤0: D1-1修改业务场景 - updateBizScene
        UpdateBizSceneRespDto updateBizSceneRespDto = null;
        UpdateBizSceneReqDto updateBizSceneReqDto = new UpdateBizSceneReqDto();
        if (reqDto != null) {
            updateBizSceneReqDto.setBizSceneId(reqDto.getBizSceneId());//sourceId:25886_1
            updateBizSceneReqDto.setBizSceneCode(reqDto.getBizSceneCode());//sourceId:25887_1
            updateBizSceneReqDto.setBizSceneName(reqDto.getBizSceneName());//sourceId:25888_1
            updateBizSceneReqDto.setBizSceneDes(reqDto.getBizSceneDes());//sourceId:25889_1
            updateBizSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:25890_1
        }

        /*D1-1修改业务场景[756]   */
        Assert.isNull(updateBizSceneReqDto.getBizSceneId(), "B1-1修改业务场景（平台）-D1-1修改业务场景-业务场景ID不能为空", false);
        updateBizSceneRespDto = fwBaseAppSceneClient.updateBizScene(updateBizSceneReqDto).getData();


        BffUpdateBizSceneRespDto retData = new BffUpdateBizSceneRespDto();


        return retData;
    }

    /**
     * B1-1新增业务场景（平台）[760]
     * gen by moon at 8/10/2022, 3:41:37 AM
     */
    @Trace(operationName = "B1-1新增业务场景（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddBizSceneRespDto addBizScene(BffAddBizSceneReqDto reqDto) {


        AddBizSceneRespDto addBizSceneRespDto_1 = null;
//步骤0: D1-1新增业务场景 - addBizScene
        AddBizSceneRespDto addBizSceneRespDto = null;
        AddBizSceneReqDto addBizSceneReqDto = new AddBizSceneReqDto();
        if (reqDto != null) {
            addBizSceneReqDto.setBizSceneCode(reqDto.getBizSceneCode());//sourceId:25780_1
            addBizSceneReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:25781_1
            addBizSceneReqDto.setBizSceneName(reqDto.getBizSceneName());//sourceId:25782_1
            addBizSceneReqDto.setBizSceneDes(reqDto.getBizSceneDes());//sourceId:25783_1
            addBizSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:25784_1
        }

        /*D1-1新增业务场景[755]   */
        Assert.isNull(addBizSceneReqDto.getBizSceneCode(), "B1-1新增业务场景（平台）-D1-1新增业务场景-业务场景标识不能为空", false);
        Assert.isNull(addBizSceneReqDto.getBizAppId(), "B1-1新增业务场景（平台）-D1-1新增业务场景-业务应用ID不能为空", false);
        Assert.isNull(addBizSceneReqDto.getBizSceneName(), "B1-1新增业务场景（平台）-D1-1新增业务场景-业务场景名称不能为空", false);
        Assert.isNull(addBizSceneReqDto.getSubjectLifeCycle(), "B1-1新增业务场景（平台）-D1-1新增业务场景-主体生命周期不能为空", false);
        addBizSceneRespDto = fwBaseAppSceneClient.addBizScene(addBizSceneReqDto).getData();

        addBizSceneRespDto_1 = addBizSceneRespDto;

        BffAddBizSceneRespDto retData = new BffAddBizSceneRespDto();
        if (addBizSceneRespDto_1 != null) {
            retData.setBizSceneId(addBizSceneRespDto_1.getBizSceneId());//sourceId:27637_1
        }


        return retData;
    }

    /**
     * B1-1查询应用赋能场景列表（平台）[759]
     * gen by moon at 8/15/2022, 10:27:38 PM
     */
    @Trace(operationName = "B1-1查询应用赋能场景列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizAppSceneRelListRespDto queryBizAppSceneRelList(BffQueryBizAppSceneRelListReqDto reqDto) {


        QueryBizAppSceneRelListRespDto queryBizAppSceneRelListRespDto_1 = null;
//步骤0: D1-1查询应用赋能场景列表 - queryBizAppSceneRelList
        QueryBizAppSceneRelListRespDto queryBizAppSceneRelListRespDto = null;
        QueryBizAppSceneRelListReqDto queryBizAppSceneRelListReqDto = new QueryBizAppSceneRelListReqDto();
        if (reqDto != null) {
            queryBizAppSceneRelListReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:33267_1
            queryBizAppSceneRelListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:34883_1
        }

        /*D1-1查询应用赋能场景列表[1417]   */
        Assert.isNull(queryBizAppSceneRelListReqDto.getIsArchive(), "B1-1查询应用赋能场景列表（平台）-D1-1查询应用赋能场景列表-是否存档不能为空", false);
        queryBizAppSceneRelListRespDto = fwBaseAppSceneClient.queryBizAppSceneRelList(queryBizAppSceneRelListReqDto).getData();

        queryBizAppSceneRelListRespDto_1 = queryBizAppSceneRelListRespDto;

        BffQueryBizAppSceneRelListRespDto retData = new BffQueryBizAppSceneRelListRespDto();
        if (queryBizAppSceneRelListRespDto_1 != null) {
            retData.setBizAppSceneRelList(queryBizAppSceneRelListRespDto_1.getBizAppSceneRelList().stream().map(item -> BeanUtil.toBean(item, BffBizAppSceneRelDto.class)).collect(Collectors.toList()));//sourceId:34901_1
        }


        retData.setPageNum(queryBizAppSceneRelListRespDto.getPageNum());
        retData.setPageSize(queryBizAppSceneRelListRespDto.getPageSize());
        retData.setTotal(queryBizAppSceneRelListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryBizAppSceneRelListRespDto.getTotalNum()) / Double.valueOf(queryBizAppSceneRelListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-1查询业务场景列表（平台）[758]
     * gen by moon at 8/10/2022, 3:41:29 AM
     */
    @Trace(operationName = "B1-1查询业务场景列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizSceneListRespDto queryBizSceneList(BffQueryBizSceneListReqDto reqDto) {


        QueryBizSceneListRespDto queryBizSceneListRespDto_1 = null;
//步骤0: D1-1查询业务场景列表 - queryBizSceneList
        QueryBizSceneListRespDto queryBizSceneListRespDto = null;
        QueryBizSceneListReqDto queryBizSceneListReqDto = new QueryBizSceneListReqDto();
        if (reqDto != null) {
            queryBizSceneListReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:33187_1
            queryBizSceneListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:33190_1
        }

        /*D1-1查询业务场景列表[753]   */
        Assert.isNull(queryBizSceneListReqDto.getBizAppId(), "B1-1查询业务场景列表（平台）-D1-1查询业务场景列表-业务应用ID不能为空", false);
        Assert.isNull(queryBizSceneListReqDto.getIsArchive(), "B1-1查询业务场景列表（平台）-D1-1查询业务场景列表-是否存档不能为空", false);
        queryBizSceneListRespDto = fwBaseAppSceneClient.queryBizSceneList(queryBizSceneListReqDto).getData();

        queryBizSceneListRespDto_1 = queryBizSceneListRespDto;

        BffQueryBizSceneListRespDto retData = new BffQueryBizSceneListRespDto();
        if (queryBizSceneListRespDto_1 != null) {
            retData.setBizSceneList(queryBizSceneListRespDto_1.getBizSceneList().stream().map(item -> BeanUtil.toBean(item, BffBizSceneDto.class)).collect(Collectors.toList()));//sourceId:33192_1
        }


        retData.setPageNum(queryBizSceneListRespDto.getPageNum());
        retData.setPageSize(queryBizSceneListRespDto.getPageSize());
        retData.setTotal(queryBizSceneListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryBizSceneListRespDto.getTotalNum()) / Double.valueOf(queryBizSceneListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-1修改业务应用（平台）[751]
     * gen by moon at 8/10/2022, 3:41:24 AM
     */
    @Trace(operationName = "B1-1修改业务应用（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateBizAppSceneRespDto updateBizAppScene(BffUpdateBizAppSceneReqDto reqDto) {


        //步骤0: D1-1修改业务应用 - updateBizAppScene
        UpdateBizAppSceneRespDto updateBizAppSceneRespDto = null;
        UpdateBizAppSceneReqDto updateBizAppSceneReqDto = new UpdateBizAppSceneReqDto();
        if (reqDto != null) {
            updateBizAppSceneReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:25409_1
            updateBizAppSceneReqDto.setBizAppCode(reqDto.getBizAppCode());//sourceId:25410_1
            updateBizAppSceneReqDto.setBizAppName(reqDto.getBizAppName());//sourceId:25411_1
            updateBizAppSceneReqDto.setBizAppDes(reqDto.getBizAppDes());//sourceId:25412_1
            updateBizAppSceneReqDto.setMiddleground(reqDto.getMiddleground());//sourceId:25413_1
            updateBizAppSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:25414_1
        }

        /*D1-1修改业务应用[746]   */
        Assert.isNull(updateBizAppSceneReqDto.getBizAppId(), "B1-1修改业务应用（平台）-D1-1修改业务应用-业务应用ID不能为空", false);
        updateBizAppSceneRespDto = fwBaseAppSceneClient.updateBizAppScene(updateBizAppSceneReqDto).getData();


        BffUpdateBizAppSceneRespDto retData = new BffUpdateBizAppSceneRespDto();


        return retData;
    }

    /**
     * B1-1新增业务应用（平台）[750]
     * gen by moon at 8/10/2022, 3:41:21 AM
     */
    @Trace(operationName = "B1-1新增业务应用（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddBizAppSceneRespDto addBizAppScene(BffAddBizAppSceneReqDto reqDto) {


        AddBizAppSceneRespDto addBizAppSceneRespDto_1 = null;
//步骤0: D1-1新增业务应用 - addBizAppScene
        AddBizAppSceneRespDto addBizAppSceneRespDto = null;
        AddBizAppSceneReqDto addBizAppSceneReqDto = new AddBizAppSceneReqDto();
        if (reqDto != null) {
            addBizAppSceneReqDto.setBizAppCode(reqDto.getBizAppCode());//sourceId:20856_1
            addBizAppSceneReqDto.setBizAppName(reqDto.getBizAppName());//sourceId:20858_1
            addBizAppSceneReqDto.setBizAppDes(reqDto.getBizAppDes());//sourceId:20859_1
            addBizAppSceneReqDto.setMiddleground(reqDto.getMiddleground());//sourceId:20860_1
            addBizAppSceneReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:20861_1
        }

        /*D1-1新增业务应用[744]   */
        Assert.isNull(addBizAppSceneReqDto.getBizAppCode(), "B1-1新增业务应用（平台）-D1-1新增业务应用-业务应用标识不能为空", false);
        Assert.isNull(addBizAppSceneReqDto.getBizAppName(), "B1-1新增业务应用（平台）-D1-1新增业务应用-业务应用名称不能为空", false);
        Assert.isNull(addBizAppSceneReqDto.getMiddleground(), "B1-1新增业务应用（平台）-D1-1新增业务应用-是否中台不能为空", false);
        Assert.isNull(addBizAppSceneReqDto.getSubjectLifeCycle(), "B1-1新增业务应用（平台）-D1-1新增业务应用-主体生命周期不能为空", false);
        addBizAppSceneRespDto = fwBaseAppSceneClient.addBizAppScene(addBizAppSceneReqDto).getData();

        addBizAppSceneRespDto_1 = addBizAppSceneRespDto;

        BffAddBizAppSceneRespDto retData = new BffAddBizAppSceneRespDto();
        if (addBizAppSceneRespDto_1 != null) {
            retData.setBizAppId(addBizAppSceneRespDto_1.getBizAppId());//sourceId:27639_1
        }


        return retData;
    }

    /**
     * B1-1查询业务应用详情（平台）[749]
     * gen by moon at 8/10/2022, 3:41:17 AM
     */
    @Trace(operationName = "B1-1查询业务应用详情（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizAppSceneDetailRespDto queryBizAppSceneDetail(BffQueryBizAppSceneDetailReqDto reqDto) {


        QueryBizAppSceneDetailRespDto queryBizAppSceneDetailRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D1-1查询业务应用详情 - queryBizAppSceneDetail
        QueryBizAppSceneDetailRespDto queryBizAppSceneDetailRespDto = null;
        QueryBizAppSceneDetailReqDto queryBizAppSceneDetailReqDto = new QueryBizAppSceneDetailReqDto();
        if (reqDto != null) {
            queryBizAppSceneDetailReqDto.setBizAppId(reqDto.getBizAppId());//sourceId:25355_1
        }

        /*D1-1查询业务应用详情[743]   */
        Assert.isNull(queryBizAppSceneDetailReqDto.getBizAppId(), "B1-1查询业务应用详情（平台）-D1-1查询业务应用详情-业务应用ID不能为空", false);
        queryBizAppSceneDetailRespDto = fwBaseAppSceneClient.queryBizAppSceneDetail(queryBizAppSceneDetailReqDto).getData();

        queryBizAppSceneDetailRespDto_1 = queryBizAppSceneDetailRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryBizAppSceneDetailRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryBizAppSceneDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryBizAppSceneDetailRespDto.getOperationInductionId());//sourceId:16329_1
            }

            /*D1-3查询个人就职记录信息详情（公共）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B1-1查询业务应用详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();

            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

        BffQueryBizAppSceneDetailRespDto retData = new BffQueryBizAppSceneDetailRespDto();
        if (queryBizAppSceneDetailRespDto_1 != null) {
            retData.setBizAppId(queryBizAppSceneDetailRespDto_1.getBizAppId());//sourceId:25358_1
            retData.setBizAppName(queryBizAppSceneDetailRespDto_1.getBizAppName());//sourceId:25361_1
            retData.setBizAppCode(queryBizAppSceneDetailRespDto_1.getBizAppCode());//sourceId:25359_1
            retData.setMiddleground(queryBizAppSceneDetailRespDto_1.getMiddleground());//sourceId:25363_1
            retData.setBizAppDes(queryBizAppSceneDetailRespDto_1.getBizAppDes());//sourceId:25362_1
            retData.setSubjectLifeCycle(queryBizAppSceneDetailRespDto_1.getSubjectLifeCycle());//sourceId:25364_1
            retData.setOperationInductionId(queryBizAppSceneDetailRespDto_1.getOperationInductionId());//sourceId:25365_1
            retData.setOperateTime(queryBizAppSceneDetailRespDto_1.getOperateTime());//sourceId:25366_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//sourceId:25368_1
            retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:25369_1
            retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:25370_1
            retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//sourceId:25371_1
        }


        return retData;
    }

    /**
     * B1-1查询业务场景菜单列表(边界)[4577]
     * gen by moon at 9/17/2022, 11:01:50 PM
     */
    @Trace(operationName = "B1-1查询业务场景菜单列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizSceneMenuListBorderRespDto queryBizSceneMenuListBorder(BffQueryBizSceneMenuListBorderReqDto reqDto) {


        QueryBizSceneMenuListRespDto queryBizSceneMenuListRespDto_1 = null;
//步骤0: D1-1查询业务场景菜单列表 - queryBizSceneMenuList
        QueryBizSceneMenuListRespDto queryBizSceneMenuListRespDto = null;
        QueryBizSceneMenuListReqDto queryBizSceneMenuListReqDto = new QueryBizSceneMenuListReqDto();
        queryBizSceneMenuListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:333427_1
        if (reqDto != null) {
            queryBizSceneMenuListReqDto.setBizAppCode(reqDto.getBizAppCode());//sourceId:332346_1
        }

        /*D1-1查询业务场景菜单列表[4579]   */
        Assert.isNull(queryBizSceneMenuListReqDto.getBizAppCode(), "B1-1查询业务场景菜单列表(边界)-D1-1查询业务场景菜单列表-业务应用标识不能为空", false);
        Assert.isNull(queryBizSceneMenuListReqDto.getSubjectLifeCycle(), "B1-1查询业务场景菜单列表(边界)-D1-1查询业务场景菜单列表-主体生命周期不能为空", false);
        queryBizSceneMenuListRespDto = fwBaseAppSceneClient.queryBizSceneMenuList(queryBizSceneMenuListReqDto).getData();


        queryBizSceneMenuListRespDto_1 = queryBizSceneMenuListRespDto;

        BffQueryBizSceneMenuListBorderRespDto retData = new BffQueryBizSceneMenuListBorderRespDto();
        if (queryBizSceneMenuListRespDto_1 != null) {
            retData.setBizSceneList(queryBizSceneMenuListRespDto_1.getBizSceneList().stream().map(item -> BeanUtil.toBean(item, BffBizSceneDto.class)).collect(Collectors.toList()));//sourceId:332349_1
        }


        return retData;
    }

    /**
     * B1-1查询赋能的应用列表(管理)(公共)(边界)[4978]
     * gen by moon at 10/22/2022, 4:28:24 PM
     */
    @Trace(operationName = "B1-1查询赋能的应用列表(管理)(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryEnablingAppListComBorderRespDto queryEnablingAppListComBorder(BffQueryEnablingAppListComBorderReqDto reqDto) {


        QueryEnablingAppListRespDto queryEnablingAppListRespDto_1 = null;
//步骤0: D1-1查询赋能的应用列表 - queryEnablingAppList
        QueryEnablingAppListRespDto queryEnablingAppListRespDto = null;
        QueryEnablingAppListReqDto queryEnablingAppListReqDto = new QueryEnablingAppListReqDto();
        if (reqDto != null) {
            queryEnablingAppListReqDto.setBizAppCode(reqDto.getBizAppCode());//SimpleFieldAssign//sourceId:385227_1
        }

        /*D1-1查询赋能的应用列表[4977]   */
        Assert.isNull(queryEnablingAppListReqDto.getBizAppCode(), "B1-1查询赋能的应用列表(管理)(公共)(边界)-D1-1查询赋能的应用列表-业务应用标识不能为空", false);
        queryEnablingAppListRespDto = fwBaseAppSceneClient.queryEnablingAppList(queryEnablingAppListReqDto).getData();


        queryEnablingAppListRespDto_1 = queryEnablingAppListRespDto;

        BffQueryEnablingAppListComBorderRespDto retData = new BffQueryEnablingAppListComBorderRespDto();
        //todo dong 未找到匹配生成策略,请检查生成策略retData.setEnablingAppList(queryEnablingAppListRespDto_1.getBizAppSceneList().getBizAppId()/queryEnablingAppListRespDto_1.getBizAppSceneList().getBizAppCode()/queryEnablingAppListRespDto_1.getBizAppSceneList().getBizAppName()),数据源项; to( ==>tableName:undefined, fieldEnname:EnablingAppList ,uniqueId: 385230_1 uniqueSourceId:out_null_null) from (varName:undefined fieldundefined)
        retData.setEnablingAppList(queryEnablingAppListRespDto_1.getBizAppSceneList().stream().map(p -> BeanUtil.toBean(p, BffEnablingAppDto.class)).collect(Collectors.toList()));


        return retData;
    }

    /**
     * B1-1查询赋能的应用业务场景列表(管理)(公共)(边界)[4980]
     * gen by moon at 10/27/2022, 4:23:07 PM
     */
    @Trace(operationName = "B1-1查询赋能的应用业务场景列表(管理)(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryEnablingAppSceneListComBorderRespDto queryEnablingAppSceneListComBorder(BffQueryEnablingAppSceneListComBorderReqDto reqDto) {


        QueryEnablingAppSceneListComRespDto queryEnablingAppSceneListComRespDto_1 = null;
//步骤0: D1-1查询赋能的应用业务场景列表(公共) - queryEnablingAppSceneListCom
        QueryEnablingAppSceneListComRespDto queryEnablingAppSceneListComRespDto = null;
        QueryEnablingAppSceneListComReqDto queryEnablingAppSceneListComReqDto = new QueryEnablingAppSceneListComReqDto();
        if (reqDto != null) {
            queryEnablingAppSceneListComReqDto.setBizAppCode(reqDto.getBizAppCode());//SimpleFieldAssign//sourceId:386429_1
            queryEnablingAppSceneListComReqDto.setByBizAppId(reqDto.getByBizAppId());//SimpleFieldAssign//sourceId:385251_1
        }

        /*D1-1查询赋能的应用业务场景列表(公共)[4979]   */
        Assert.isNull(queryEnablingAppSceneListComReqDto.getBizAppCode(), "B1-1查询赋能的应用业务场景列表(管理)(公共)(边界)-D1-1查询赋能的应用业务场景列表(公共)-业务应用标识不能为空", false);
        Assert.isNull(queryEnablingAppSceneListComReqDto.getByBizAppId(), "B1-1查询赋能的应用业务场景列表(管理)(公共)(边界)-D1-1查询赋能的应用业务场景列表(公共)-被赋能业务应用ID不能为空", false);
        queryEnablingAppSceneListComRespDto = fwBaseAppSceneClient.queryEnablingAppSceneListCom(queryEnablingAppSceneListComReqDto).getData();


        queryEnablingAppSceneListComRespDto_1 = queryEnablingAppSceneListComRespDto;

        BffQueryEnablingAppSceneListComBorderRespDto retData = new BffQueryEnablingAppSceneListComBorderRespDto();
        if (queryEnablingAppSceneListComRespDto_1 != null) {
            retData.setEnablingAppSceneList(queryEnablingAppSceneListComRespDto_1.getBizAppSceneRelList().stream().map(item -> BeanUtil.toBean(item, BffEnablingAppSceneDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:387988_1
        }


        return retData;
    }

    /**
     * B1-1查询宿主类型未推荐场景列表(管理)(边界)[1104]
     * gen by moon at 10/27/2022, 4:23:05 PM
     */
    @Trace(operationName = "B1-1查询宿主类型未推荐场景列表(管理)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBizScnHostTypeListBorderRespDto queryBizScnHostTypeListBorder(BffQueryBizScnHostTypeListBorderReqDto reqDto) {


        QueryHostTypeCollectionRemoveExistingDataListRespDto collectionRemoveExistingDataRes_1 = null;
//步骤0: D1-1查询赋能的应用业务场景列表(公共) - queryEnablingAppSceneListCom
        QueryEnablingAppSceneListComRespDto queryEnablingAppSceneListComRespDto = null;
        QueryEnablingAppSceneListComReqDto queryEnablingAppSceneListComReqDto = new QueryEnablingAppSceneListComReqDto();
        if (reqDto != null) {
            queryEnablingAppSceneListComReqDto.setBizAppCode(reqDto.getBizAppCode());//SimpleFieldAssign//sourceId:395198_1
            queryEnablingAppSceneListComReqDto.setByBizAppId(reqDto.getByBizAppId());//SimpleFieldAssign//sourceId:395196_1
        }

        /*D1-1查询赋能的应用业务场景列表(公共)[4979]   */
        Assert.isNull(queryEnablingAppSceneListComReqDto.getBizAppCode(), "B1-1查询宿主类型未推荐场景列表(管理)(边界)-D1-1查询赋能的应用业务场景列表(公共)-业务应用标识不能为空", false);
        Assert.isNull(queryEnablingAppSceneListComReqDto.getByBizAppId(), "B1-1查询宿主类型未推荐场景列表(管理)(边界)-D1-1查询赋能的应用业务场景列表(公共)-被赋能业务应用ID不能为空", false);
        queryEnablingAppSceneListComRespDto = fwBaseAppSceneClient.queryEnablingAppSceneListCom(queryEnablingAppSceneListComReqDto).getData();


//步骤1: D1-1查询宿主类型推荐的业务场景列表（边界） - queryHostTypeBizScnListBorder
        QueryHostTypeBizScnListBorderRespDto queryHostTypeBizScnListBorderRespDto = null;
        QueryHostTypeBizScnListBorderReqDto queryHostTypeBizScnListBorderReqDto = new QueryHostTypeBizScnListBorderReqDto();
        queryHostTypeBizScnListBorderReqDto.setIsArchive("FALSE");//sourceId:395188_1
        if (reqDto != null) {
            queryHostTypeBizScnListBorderReqDto.setHostTypeId(reqDto.getHostTypeId());//SimpleFieldAssign//sourceId:23075_1
        }

        /*D1-1查询宿主类型推荐的业务场景列表（边界）[1101]   */
        Assert.isNull(queryHostTypeBizScnListBorderReqDto.getHostTypeId(), "B1-1查询宿主类型未推荐场景列表(管理)(边界)-D1-1查询宿主类型推荐的业务场景列表（边界）-推荐的宿主类型ID不能为空", false);
        Assert.isNull(queryHostTypeBizScnListBorderReqDto.getIsArchive(), "B1-1查询宿主类型未推荐场景列表(管理)(边界)-D1-1查询宿主类型推荐的业务场景列表（边界）-是否存档不能为空", false);
        queryHostTypeBizScnListBorderRespDto = fwBaseHostTypeClient.queryHostTypeBizScnListBorder(queryHostTypeBizScnListBorderReqDto).getData();


//步骤2: D查询宿主类型可推荐业务场景列表 - queryHostTypeCollectionRemoveExistingDataList
        //ModelCode: collectionRemoveExistingData
        QueryHostTypeCollectionRemoveExistingDataListRespDto collectionRemoveExistingDataRes = null;
        if (queryEnablingAppSceneListComRespDto != null) {
            QueryHostTypeCollectionRemoveExistingDataListReqDto collectionRemoveExistingDataReq = new QueryHostTypeCollectionRemoveExistingDataListReqDto();
            if (queryEnablingAppSceneListComRespDto != null && queryEnablingAppSceneListComRespDto.getBizAppSceneRelList() != null && !CollectionUtil.isEmpty(queryEnablingAppSceneListComRespDto.getBizAppSceneRelList())) {
                collectionRemoveExistingDataReq.setBizSceneList(queryEnablingAppSceneListComRespDto.getBizAppSceneRelList().stream().map(item -> BeanUtil.toBean(item, BizSceneDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:46053_1
            }
            if (queryHostTypeBizScnListBorderRespDto != null) {
                collectionRemoveExistingDataReq.setHostTypeBizScnList(queryHostTypeBizScnListBorderRespDto.getHostTypeBizScnList());//list-field-assign//sourceId:46054_1
            }

            /*查询宿主类型可推荐业务场景列表（特殊方法）[1593]  入参两个数据集，通过已存在标识字段匹配，去除第一个数据集中已存在的第二个数据集的数据 */

            collectionRemoveExistingDataRes = nbAppScene.queryHostTypeCollectionRemoveExistingDataList(collectionRemoveExistingDataReq);


            collectionRemoveExistingDataRes_1 = collectionRemoveExistingDataRes;
        }

        BffQueryBizScnHostTypeListBorderRespDto retData = new BffQueryBizScnHostTypeListBorderRespDto();
        if (collectionRemoveExistingDataRes_1 != null) {
            retData.setHostTypeBizScnList(collectionRemoveExistingDataRes_1.getBizSceneList().stream().map(item -> BeanUtil.toBean(item, BffHostTypeBizScnDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:395202_1
        }


        return retData;
    }
    //
}
